package com.hb.core.pojo.center.au.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.hb.core.pojo.parent.MPCommonEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 组织架构信息表
 * </p>
 *
 * @author zhaojk
 * @since 2021-11-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("au_org")
@ApiModel(value = "Org对象", description = "组织架构信息表")
public class Org extends MPCommonEntity {


    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户Id")
    private Long tenantId;

    @ApiModelProperty(value = "父级机构ID")
    private Long parentId;

    @ApiModelProperty(value = "机构名称")
    private String orgName;

    @ApiModelProperty(value = "统一社会信用代码")
    private String creditCode;

    @ApiModelProperty(value = "所属行业(关联字典)")
    private Long industryId;

    @ApiModelProperty(value = "省份(关联字典)")
    private Long provinceId;

    @ApiModelProperty(value = "城市(关联字典)")
    private Long cityId;

    @ApiModelProperty(value = "联系人电话")
    private String contactPhone;

    @ApiModelProperty(value = "联系人地址")
    private String contactAddress;

    @ApiModelProperty(value = "联系人姓名")
    private String contactName;

    @ApiModelProperty(value = "企业负责人")
    private Long orgManager;

    @ApiModelProperty(value = "企业邮箱")
    private String email;

    @ApiModelProperty(value = "区县(关联字典)")
    private Long areaId;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "数据层级")
    private Integer level;

    @ApiModelProperty(value = "证件号码")
    private String certificateNumber;

    @ApiModelProperty(value = "证件类型")
    private String certificateType;

    @ApiModelProperty(value = "法人")
    private String legalName;

    @ApiModelProperty(value = "原因")
    private String reason;

    @ApiModelProperty(value = "审核状态")
    private Integer auditStatus;


    /**
     * 参数验证方法
     * 该方法中验证的字段对应数据库中不能为空的字段
     *
     * @return
     */
    @Override
    public String paramsValid(String... fieldNames) {
        return super.paramsValid("orgName", "creditCode", "contactName", "contactPhone");
    }
}
